﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yxinmt.Interface;

namespace Yxinmt.Components
{
    public class PopupComponent : BaseComponent, IComponent
    {
        Controls.Popup _Popup { get; set; }

        public PopupComponent(Dictionary<string, object> property, IWindow form)
        {
            _Property = property;
            Window = form;
            this.InitSet();

            this.ControlList = new List<IControl>();

            _Popup = new Controls.Popup(_Property, this);
            this.ControlList.Add(_Popup);

            ComponentList = new List<IComponent>();
            SetView();

            var list = this.GetComponentsElements();
            if (list.Count == 1) _Popup.Add(list[0]);
        }
    }
}
